package com.yiyi.credit.manage.abutment.common.enums;

public enum platFormEnum {

    CCXI("ccxi","guoxin_test"),
    TD("td","trustworld_web");

    /*CCXI("ccxi","guoxin_api"),
    TD("td","trustworld");*/

    private final String code;
    private final String value;

    platFormEnum(String code, String value)
    {
        this.code = code;
        this.value = value;
    }

    public String getCode()
    {
        return code;
    }

    public String getValue()
    {
        return value;
    }

    public static boolean platFormCode(String code)
    {
        for (platFormEnum s : platFormEnum.values())
        {
            if (s.getCode().equals(code))
            {
                return true;
            }
        }
        return false;
    }
    /**
     * 根据编码获取信息
     * @param code
     * @return
     */
    public static String getPrivateKeyByCode(String code)
    {
        for (platFormEnum v : platFormEnum.values())
        {
            if (v.getCode().equals(code))
            {
                return v.getValue();
            }
        }
        return null;
    }
}
